<h1>Test Page</h1>
<button id="btn">open</button>
<p id="message"></p>
<script>
    btn.onclick=async ()=>getTheFile()

    const pickerOpts = {
  types: [
    {
      description: 'Images',
      accept: {
        'image/*': ['.png', '.gif', '.jpeg', '.jpg']
      }
    },
  ],
  excludeAcceptAllOption: true,
  multiple: false
};

if (!window.showOpenFilePicker){
    message.innerHTML+='No support for file system access<br>'
}else{
    message.innerHTML+='Support for file system access<br>'
}

if (navigator.wakeLock){
    message.innerHTML+='support for wake lock<br>'
}else{
    message.innerHTML+='not support for wake lock<br>'

}

async function getTheFile() {
  // open file picker
  [fileHandle] = await window.showOpenFilePicker(pickerOpts);

  // get file contents
  const fileData = await fileHandle.getFile();
}

</script>
